import {defineStore} from 'pinia'

export const useProjectStore = defineStore('projectStore', {
  state: () => {
    return {
      projectId: undefined as string | undefined,
      projects: [] as { projectId: string, projectName: string }[]
    }
  },
  actions: {
    changeProject(id: string) {
      this.projectId = id
    },
    loadProjects() {
      this.projects = [
        {
          projectId: "123213",
          projectName: "OME Account"
        },
        {
          projectId: "21w2321321",
          projectName: "OME Work"
        }]
    }
  }
})
